# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.

defmodule GoogleApi.AdExchangeSeller.V20.Model.PreferredDeal do
  @moduledoc """


  ## Attributes

  - advertiserName (String.t): The name of the advertiser this deal is for. Defaults to: `null`.
  - buyerNetworkName (String.t): The name of the buyer network this deal is for. Defaults to: `null`.
  - currencyCode (String.t): The currency code that applies to the fixed_cpm value. If not set then assumed to be USD. Defaults to: `null`.
  - endTime (String.t): Time when this deal stops being active in seconds since the epoch (GMT). If not set then this deal is valid until manually disabled by the publisher. Defaults to: `null`.
  - fixedCpm (String.t): The fixed price for this preferred deal. In cpm micros of currency according to currencyCode. If set, then this preferred deal is eligible for the fixed price tier of buying (highest priority, pay exactly the configured fixed price). Defaults to: `null`.
  - id (String.t): Unique identifier of this preferred deal. Defaults to: `null`.
  - kind (String.t): Kind of resource this is, in this case adexchangeseller#preferredDeal. Defaults to: `null`.
  - startTime (String.t): Time when this deal becomes active in seconds since the epoch (GMT). If not set then this deal is active immediately upon creation. Defaults to: `null`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :advertiserName => any(),
          :buyerNetworkName => any(),
          :currencyCode => any(),
          :endTime => any(),
          :fixedCpm => any(),
          :id => any(),
          :kind => any(),
          :startTime => any()
        }

  field(:advertiserName)
  field(:buyerNetworkName)
  field(:currencyCode)
  field(:endTime)
  field(:fixedCpm)
  field(:id)
  field(:kind)
  field(:startTime)
end

defimpl Poison.Decoder, for: GoogleApi.AdExchangeSeller.V20.Model.PreferredDeal do
  def decode(value, options) do
    GoogleApi.AdExchangeSeller.V20.Model.PreferredDeal.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AdExchangeSeller.V20.Model.PreferredDeal do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
